package com.lykj.llw.box.data.bean.response;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

public class RecyclingResponse implements Parcelable {

    /**
     * code
     */
    @SerializedName("code")
    private String code;
    /**
     * status
     */
    @SerializedName("status")
    private Boolean status;
    /**
     * message
     */
    @SerializedName("message")
    private String message;
    /**
     * data
     */
    @SerializedName("data")
    private List<DataDTO> data;
    /**
     * exceptionClazz
     */
    @SerializedName("exceptionClazz")
    private Object exceptionClazz;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public Object getExceptionClazz() {
        return exceptionClazz;
    }

    public void setExceptionClazz(Object exceptionClazz) {
        this.exceptionClazz = exceptionClazz;
    }

    public static class DataDTO implements Parcelable {
        /**
         * partId
         */
        @SerializedName("partId")
        private String partId;
        /**
         * username
         */
        @SerializedName("username")
        private String username;
        /**
         * xiaohao
         */
        @SerializedName("xiaohao")
        private Object xiaohao;
        /**
         * gameid
         */
        @SerializedName("gameid")
        private Integer gameid;
        /**
         * gamename
         */
        @SerializedName("gamename")
        private String gamename;
        /**
         * gameIcon
         */
        @SerializedName("gameIcon")
        private String gameIcon;
        /**
         * roleid
         */
        @SerializedName("roleid")
        private String roleid;
        /**
         * rolename
         */
        @SerializedName("rolename")
        private String rolename;
        /**
         * zoneid
         */
        @SerializedName("zoneid")
        private String zoneid;
        /**
         * zonename
         */
        @SerializedName("zonename")
        private String zonename;
        /**
         * recyclePrice
         */
        @SerializedName("recyclePrice")
        private Double recyclePrice;
        /**
         * recyclePtbRatio
         */
        @SerializedName("recyclePtbRatio")
        private Double recyclePtbRatio;
        /**
         * sumPrice
         */
        @SerializedName("sumPrice")
        private Double sumPrice;
        /**
         * ptb
         */
        @SerializedName("ptb")
        private Integer ptb;

        public String getPartId() {
            return partId;
        }

        public void setPartId(String partId) {
            this.partId = partId;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public Object getXiaohao() {
            return xiaohao;
        }

        public void setXiaohao(Object xiaohao) {
            this.xiaohao = xiaohao;
        }

        public Integer getGameid() {
            return gameid;
        }

        public void setGameid(Integer gameid) {
            this.gameid = gameid;
        }

        public String getGamename() {
            return gamename;
        }

        public void setGamename(String gamename) {
            this.gamename = gamename;
        }

        public String getGameIcon() {
            return gameIcon;
        }

        public void setGameIcon(String gameIcon) {
            this.gameIcon = gameIcon;
        }

        public String getRoleid() {
            return roleid;
        }

        public void setRoleid(String roleid) {
            this.roleid = roleid;
        }

        public String getRolename() {
            return rolename;
        }

        public void setRolename(String rolename) {
            this.rolename = rolename;
        }

        public String getZoneid() {
            return zoneid;
        }

        public void setZoneid(String zoneid) {
            this.zoneid = zoneid;
        }

        public String getZonename() {
            return zonename;
        }

        public void setZonename(String zonename) {
            this.zonename = zonename;
        }

        public Double getRecyclePrice() {
            return recyclePrice;
        }

        public void setRecyclePrice(Double recyclePrice) {
            this.recyclePrice = recyclePrice;
        }

        public Double getRecyclePtbRatio() {
            return recyclePtbRatio;
        }

        public void setRecyclePtbRatio(Double recyclePtbRatio) {
            this.recyclePtbRatio = recyclePtbRatio;
        }

        public Double getSumPrice() {
            return sumPrice;
        }

        public void setSumPrice(Double sumPrice) {
            this.sumPrice = sumPrice;
        }

        public Integer getPtb() {
            return ptb;
        }

        public void setPtb(Integer ptb) {
            this.ptb = ptb;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.partId);
            dest.writeString(this.username);
            dest.writeParcelable((Parcelable) this.xiaohao, flags);
            dest.writeValue(this.gameid);
            dest.writeString(this.gamename);
            dest.writeString(this.gameIcon);
            dest.writeString(this.roleid);
            dest.writeString(this.rolename);
            dest.writeString(this.zoneid);
            dest.writeString(this.zonename);
            dest.writeValue(this.recyclePrice);
            dest.writeValue(this.recyclePtbRatio);
            dest.writeValue(this.sumPrice);
            dest.writeValue(this.ptb);
        }

        public void readFromParcel(Parcel source) {
            this.partId = source.readString();
            this.username = source.readString();
            this.xiaohao = source.readParcelable(Object.class.getClassLoader());
            this.gameid = (Integer) source.readValue(Integer.class.getClassLoader());
            this.gamename = source.readString();
            this.gameIcon = source.readString();
            this.roleid = source.readString();
            this.rolename = source.readString();
            this.zoneid = source.readString();
            this.zonename = source.readString();
            this.recyclePrice = (Double) source.readValue(Double.class.getClassLoader());
            this.recyclePtbRatio = (Double) source.readValue(Double.class.getClassLoader());
            this.sumPrice = (Double) source.readValue(Double.class.getClassLoader());
            this.ptb = (Integer) source.readValue(Integer.class.getClassLoader());
        }

        public DataDTO() {
        }

        protected DataDTO(Parcel in) {
            this.partId = in.readString();
            this.username = in.readString();
            this.xiaohao = in.readParcelable(Object.class.getClassLoader());
            this.gameid = (Integer) in.readValue(Integer.class.getClassLoader());
            this.gamename = in.readString();
            this.gameIcon = in.readString();
            this.roleid = in.readString();
            this.rolename = in.readString();
            this.zoneid = in.readString();
            this.zonename = in.readString();
            this.recyclePrice = (Double) in.readValue(Double.class.getClassLoader());
            this.recyclePtbRatio = (Double) in.readValue(Double.class.getClassLoader());
            this.sumPrice = (Double) in.readValue(Double.class.getClassLoader());
            this.ptb = (Integer) in.readValue(Integer.class.getClassLoader());
        }

        public static final Creator<DataDTO> CREATOR = new Creator<DataDTO>() {
            @Override
            public DataDTO createFromParcel(Parcel source) {
                return new DataDTO(source);
            }

            @Override
            public DataDTO[] newArray(int size) {
                return new DataDTO[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeValue(this.status);
        dest.writeString(this.message);
        dest.writeList(this.data);
        dest.writeParcelable((Parcelable) this.exceptionClazz, flags);
    }

    public void readFromParcel(Parcel source) {
        this.code = source.readString();
        this.status = (Boolean) source.readValue(Boolean.class.getClassLoader());
        this.message = source.readString();
        this.data = new ArrayList<DataDTO>();
        source.readList(this.data, DataDTO.class.getClassLoader());
        this.exceptionClazz = source.readParcelable(Object.class.getClassLoader());
    }

    public RecyclingResponse() {
    }

    protected RecyclingResponse(Parcel in) {
        this.code = in.readString();
        this.status = (Boolean) in.readValue(Boolean.class.getClassLoader());
        this.message = in.readString();
        this.data = new ArrayList<DataDTO>();
        in.readList(this.data, DataDTO.class.getClassLoader());
        this.exceptionClazz = in.readParcelable(Object.class.getClassLoader());
    }

    public static final Parcelable.Creator<RecyclingResponse> CREATOR = new Parcelable.Creator<RecyclingResponse>() {
        @Override
        public RecyclingResponse createFromParcel(Parcel source) {
            return new RecyclingResponse(source);
        }

        @Override
        public RecyclingResponse[] newArray(int size) {
            return new RecyclingResponse[size];
        }
    };
}
